home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / private / _set8025.c < prev    next >
C/C++ Source or Header  |  1993-06-18  |  2KB  |  84 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifdef PDCDEBUG
  5. char *rcsid__set8025 = "$Header: C:\CURSES\private\RCS\_set8025.c 2.1 1993/06/18 20:23:42 MH Rel MH $";
  6. #endif
  7.  
  8.  
  9.  
  10.  
  11. /*man-start*********************************************************************
  12.  
  13.   PDC_set_80x25()    - force a known screen state: 80x25 text mode.
  14.  
  15.   PDCurses Description:
  16.      This is a private PDCurses function.
  17.  
  18.      Forces the appropriate 80x25 alpha mode given the display adapter.
  19.  
  20.      Since we currently do not support changing the virtual console size,
  21.      this routine is a NOP under Flexos.
  22.  
  23.   PDCurses Return Value:
  24.      This function returns OK upon success otherwise ERR is returned.
  25.  
  26.   PDCurses Errors:
  27.      No errors are defined for this routine.
  28.  
  29.   Portability:
  30.      PDCurses    int    PDC_set_80x25( void );
  31.  
  32. **man-end**********************************************************************/
  33.  
  34. int    PDC_set_80x25(void)
  35. {
  36. #ifdef    OS2
  37.     VIOMODEINFO modeInfo;
  38. #endif
  39.  
  40. #ifdef PDCDEBUG
  41.     if (trace_on) PDC_debug("PDC_set_80x25() - called\n");
  42. #endif
  43.  
  44. #ifdef    FLEXOS
  45.     return( OK );
  46. #endif
  47.  
  48. #ifdef    DOS
  49.     switch (_cursvar.adapter)
  50.     {
  51.     case _CGA:
  52.     case _EGACOLOR:
  53.     case _EGAMONO:
  54.     case _VGACOLOR:
  55.     case _VGAMONO:
  56.     case _MCGACOLOR:
  57.     case _MCGAMONO:
  58.         regs.h.ah = 0x00;
  59.         regs.h.al = 0x03;
  60.         int86(0x10, ®s, ®s);
  61.         break;
  62.     case _MDA:
  63.         regs.h.ah = 0x00;
  64.         regs.h.al = 0x07;
  65.         int86(0x10, ®s, ®s);
  66.     default:
  67.         break;
  68.     }
  69.     return( OK );
  70. #endif
  71.  
  72. #ifdef    OS2
  73.     modeInfo.cb = sizeof(modeInfo);
  74.     /* set most parameters of modeInfo */
  75.     VioGetMode(&modeInfo, 0);
  76.     modeInfo.fbType = 1;
  77.     VioSetMode(&modeInfo, 0);
  78. #endif
  79.  
  80. #ifdef UNIX
  81. /* INCOMPLETE */
  82. #endif
  83. }
  84.